package ncku.account.unitTest;

import static org.junit.Assert.assertEquals;
import ncku.account.data.Category;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;

public class CategoryTest {
	Category cat;
       
	@Before
    public void setUp(){
		cat = new Category("TestName");
    }
	@After
    public void tearDown(){
		cat = null;
    }
    @Test
    public void test(){
    	getNameTest();
    	setNameTest("TestName2");
    }
    
    public void getNameTest(){
    	assertEquals("TestName",cat.getName());
    }
    
    public void setNameTest(String name){
    	cat.setName(name);
    	assertEquals(name,cat.getName());
    }
}